package com.genesis.web.controller;


import com.genesis.mall.common.Result;
import com.genesis.mall.entity.OmsCompanyAddress;
import com.genesis.mall.service.IOmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 公司收发货地址表 前端控制器
 * </p>
 *
 * @author Hshuai
 * @since 2022-08-01
 */
@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private IOmsCompanyAddressService companyAddressService;

    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public Result<List<OmsCompanyAddress>> list(){

        return Result.success(companyAddressService.list());

    }

}
